home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / batch / library / echon / echon.doc < prev    next >
Text File  |  1987-11-13  |  1KB  |  26 lines

  1. EchoN - Echo command line without going to a new line.
  2.   by D.J. Murdoch, 13 Nov 1987
  3.  
  4. This handy little program works like ECHO, but doesn't do a new line at the end.  
  5. I use it in batch files to save a directory: 
  6.  ECHON cd >\olddir.bat 
  7.  CD      >>\olddir.bat
  8. This puts the "cd " into the file olddir.bat in the root directory, then lists 
  9. the current directory into that file on the same line.  Executing OLDDIR any 
  10. time after that puts you back into the original directory.  Unlike PUSHDIR and 
  11. POPDIR, this lasts after you reboot your computer.
  12.  
  13. Here's source code, that could be assembled using DEBUG if ECHON.COM is missing: 
  14.  
  15. MOV     CL,[0080]    ; Put line length into CL
  16. SUB     CX,+01       ; Subtract 1 to get rid of initial blank
  17. JL      0115         ; Quit if there were no characters
  18. MOV     BX,0001      ; Output to Standard Output...
  19. MOV     DX,0082      ; from command line, starting at the 2nd char...
  20. MOV     AH,40        ; using the write service...
  21. INT     21           ; do it!
  22. INT     20           ; quit
  23.  
  24.  
  25. 
  26.